<%@ page language="java" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
${aier_doctype}
<html <s:property value="aier_html_xmlns" escape="false"/>>
<head>
<meta http-equiv="Content-Type" content="${aier_content_type}" />
<meta name="keywords" content="${aier_keyworks}" />
<meta name="description" content="${aier_description}" />
<title>${aier_title}</title>
<link rel="stylesheet" href="${aier_css_url}${aier_jqui_css}ui.css" />
<link rel="Stylesheet" href="${aier_css_url}jq/jq.css" />
<link rel="Stylesheet" href="${aier_css_url}jq/multiselect.css" />
<link rel="stylesheet" href="${aier_css_url}jc/chosen.css">
<link rel="stylesheet" href="${aier_css_url}social/module/jq-msg.css" />
<link rel="stylesheet" href="${aier_css_url}social/module/reset.css" />
<link rel="stylesheet" href="${aier_css_url}social/school/common.css" />
<link rel="stylesheet" href="${aier_css_url}social/school/smanage.css" />

<script type="text/javascript" src="${aier_js_url}j.js"></script>
<script type="text/javascript" src="${aier_js_url}b.js"></script>
<script type="text/javascript" src="${aier_js_url}${aier_jqui_js}ui.js"></script>
<script type="text/javascript" src="${aier_js_url}97/WdatePicker.js"></script>
<script type="text/javascript" src="${aier_js_url}jp/msg.js"></script>
<script type="text/javascript" src="${aier_js_url}jq/cn.js"></script>
<script type="text/javascript" src="${aier_js_url}jq/jq.js"></script>
<script type="text/javascript" src="${aier_js_url}lib/ja.js"></script>
<script type="text/javascript" src="${aier_js_url}jc/cj.js"></script>
<script type="text/javascript" src="${aier_js_url}lib/block.js"></script>
<script type="text/javascript" src="${aier_js_url}jq/multiselect.js"></script>
<script type="text/javascript" src="${aier_js_url}social/school/attend/teamon.js"></script>
</head>
<script type="text/javascript">
	var global_suffix = "${aier_suffix}", global_url = "${aier_url}", global_uri = "${aier_uri}", global_urijs = "${aier_urijs}", 
		global_sid = "${sid}", global_tid = "${tid}",global_teacherin_url = "${video_teacher_in_url}",global_teacherout_url = "${video_teacher_out_url}";
</script>
<!-- 教师查看的每月考勤页面 -->
<body>
	
	<!-- 顶栏 -->
	<s:action name="userhomecomm_homeHead" namespace="/user"
		executeResult="true"></s:action>

	<!-- 正文 -->
	<div id="hfContent" class="ar-content">
		<div class="content-main">
			<!-- 学校名称栏 -->
			<s:action name="scomm_schoolMTitle" namespace="/school"
				executeResult="true"></s:action>
			<div class="main-content wrap-bg clearfix">
				<!-- 左侧栏 -->
				<s:action name="scomm_teacherMLeft" namespace="/school"
					executeResult="true"></s:action>
				<!-- 右侧内容 -->
				<div class="ae-right">
					<div class="right-main">
						<div class="right-main-top">
							<div class="binfo-title">
								<h3>每月考勤</h3>
							</div>
							<div class="right-line"></div>
						</div>
						<div class="right-main-c">
							<div id="tabs">
								<ul>
									<li><a href="#attendOverview">考勤概况</a>
									</li>
									<li><a href="#attendDetails">考勤明细</a>
									</li>
									<li><a href="#attendAbnormal">异常请假</a>
									</li>
								</ul>
								<!-- 考勤概况 -->
								<div id="attendOverview">
									<div class="info-tab01">
										<table>
											<tbody>
												<tr>
													<th class="gray6">起始年月：</th>
													<td><input id="start_txt" type="text" class="PY-input"
														onfocus="WdatePicker({skin:'twoer',dateFmt:'yyyy-MM',readOnly:true})">
													</td>
													<th class="gray6">结束年月：</th>
													<td><input id="end_txt" type="text" class="PY-input"
														onfocus="WdatePicker({skin:'twoer',dateFmt:'yyyy-MM',readOnly:true})">
													</td>
													<td style="width:150px;" align="right"><a
														onclick="search_atm()" href="javascript:;"
														class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only fr"
														role="button" aria-disabled="false"><span
															class="ui-button-text">查询</span> </a>
													</td>
												</tr>

											</tbody>

										</table>
									</div>
									<div class="right-main-down">
										<div class="down-line"></div>

										<div class="down-inre">
											<table id="schoolMonInfo"></table>
											<div id="schoolMonPage"></div>
										</div>
									</div>
								</div>
								<!-- 考勤明细页面 -->
								<div id="attendDetails">
									<div class="info-tab01">
										<table>
											<tbody>
												<tr>
													<th class="gray6">起始时间：</th>
													<td><input type="text" id="startTime" class="PY-input"
														onfocus="WdatePicker({skin:'twoer',dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true})" />
													</td>
													<th class="gray6">结束时间：</th>
													<td><input type="text" id="EndTime" class="PY-input"
														onfocus="WdatePicker({skin:'twoer',dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true})" />
													</td>
													<td style="width:150px;" align="right"><a onclick="search_ad()" href="javascript:;"
														class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only fr"
														role="button" aria-disabled="false"><span
															class="ui-button-text">查询</span></a>
													</td>
												</tr>
												
											</tbody>

										</table>
									</div>
									<div class="right-main-down">
										<div class="down-line"></div>

										<div class="down-inre">
											<table id="detailsinfo"></table>
											<div id="detailspage"></div>
										</div>

									</div>
									
									
								</div>
								
								<div id="attendAbnormal">
									<div class="info-tab01">
										<table>
											<tbody>
												<tr>
													<th class="gray6">起始时间：</th>
													<td><input type="text" id="aabStartTime" class="PY-input"
														onfocus="WdatePicker({skin:'twoer',dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true})" />
													</td>
													<th class="gray6">结束时间：</th>
													<td><input type="text" id="aabEndTime" class="PY-input"
														onfocus="WdatePicker({skin:'twoer',dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true})" />
													</td>

												</tr>
											
												<tr>
													<td colspan="4" align="right"><a onclick="search_leave()"
														href="javascript:;"
														class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only fr"
														role="button" aria-disabled="false"><span
															class="ui-button-text">查询</span> </a>
													</td>
												</tr>
											</tbody>

										</table>
									</div>
									<div class="right-main-down">
										<div class="down-line"></div>
										<div class="down-inre">
											<table id="leaveinfo"></table>
											<div id="leavepage"></div>
										</div>
									</div>
								</div>
							</div>

						</div>
					</div>
				</div>

			</div>

		</div>
		<!-- footer copyright -->
		<s:action name="userhomecomm_homeFooter" namespace="/user" executeResult="true"></s:action>
		<!-- /footer copyright -->
	</div>
</body>
<script type="text/javascript">
	$("#tabs").tabs();
	$(".chosen").chosen();

	//查询每月考勤
	function search_atm() {	
		var monthBeginValue = $('#start_txt').val();
		var monthEndValue = $('#end_txt').val();
		jQuery("#schoolMonInfo")
				.jqGrid(
						'setGridParam',
						{
							url : "${aier_url}${aier_urijs}schoolmon_searchATMList_normal${aier_suffix}?sid="
									+ global_sid
									+ "&tid="+global_tid
									+ "&monthBeginValue="
									+ monthBeginValue
									+ "&monthEndValue="
									+ monthEndValue,
							page : 1
						}).trigger("reloadGrid");
	}

	//查询打卡信息
	function search_ad() {
		var dayBeginValue = $('#startTime').val();
		var dayEndValue = $('#EndTime').val();
		jQuery("#detailsinfo")
				.jqGrid(
						'setGridParam',
						{
							url : "${aier_url}${aier_urijs}schoolmon_searchADList_normal${aier_suffix}?sid="
									+ global_sid
									+ "&tid="+global_tid
									+ "&dayBeginValue="
									+ dayBeginValue
									+ "&dayEndValue="
									+ dayEndValue,
							page : 1
						}).trigger("reloadGrid");
	}

	//查询异常请假
	function search_leave() {
		var monthBeginValue = $('#start_txt').val();
		var monthEndValue = $('#end_txt').val();
		jQuery("#leaveinfo")
				.jqGrid(
						'setGridParam',
						{
							url : "${aier_url}${aier_urijs}schoolmon_searchLeaveList_normal${aier_suffix}?sid="
									+ global_sid
									+ "&tid="+global_tid
									+ "&monthBeginValue="
									+ monthBeginValue
									+ "&monthEndValue="
									+ monthEndValue,
							page : 1
						}).trigger("reloadGrid");
	}

</script>

</html>